﻿@model IEnumerable<SelectListItem>

@{
    ViewBag.Title = "GroupList";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<fieldset>
<legend>Choose Group</legend>
@Html.DropDownList("Departments", Model)

<div id="divSpec"></div>

</fieldset>
<script>
    (function () {
        $("#Departments").change(function () {
            $("#divSpec").load("/Schedule/GetSpecialities", this[this.selectedIndex].value);
        });
    })();

    $(document).ready(function () {
        $("#Departments").change();
    })
</script>




